home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
program
/
bgui12.lha
/
docs
/
externalclass.doc
< prev
next >
Wrap
Text File
|
1995-04-23
|
6KB
|
154 lines
File: externalclass.doc
Description: Externalclass documentation.
Copyright: (C) Copyright 1994-1995 Jaba Development.
(C) Copyright 1994-1995 Jan van den Baard.
All Rights Reserved.
------------------------------------------------------------------------------
TABLE OF CONTENTS
externalclass/--background--
externalclass/Methods
externalclass/Attributes
externalclass/--background-- externalclass/--background--
NAME
Class: externalclass
Superclass: baseclass
Include File: <libraries/bgui.h>
FUNCTION
To provide an interface class which can be used to include third-party
gadget classes like the colorwheel.gadget in a BGUI user interface.
Notification is currently only possible via the WM_ADDUPDATE method.
See the windowclass documentation for more information on this
subject.
externalclass/Methods externalclass/Methods
NEW METHODS
None.
CHANGED METHODS
None.
externalclass/Attributes externalclass/Attributes
NAME
EXT_Class -- ( Class * ), EXT_ClassID -- ( STRPTR )
FUNCTION
Set the class from which this class needs to create an object. The
EXT_Class attribute expects a pointer to an already initialized class.
The EXT_ClassID expects the name of the public class like for instance
"colorwheel.gadget". Please note that _you_ are responsible for
opening and closing the class library yourself.
Default NULL. Applicability is (I).
NAME
EXT_MinWidth, EXT_MinHeight -- ( ULONG )
FUNCTION
As external classes normally do not understand the layout engine
methods used by BGUI it has to be helped a little. With these
attributes you set the minimum width and height of the external
object. It is very important to set reasonable values here because no
checks are made.
Default is 0 (stupid size). Applicabilty is (I).
NAME
EXT_TrackAttr -- ( Tag )
FUNCTION
To tell which attributes from the external object need to be tracked.
Because some external classes, like the colorwheel, cannot change size
once created it is necessary that the externalclass re-creates the
object at each size change. As this usually means that the current
external object settings are lost you can tell which attributes need
to be tracked.
The tracked attributes are obtained by sending the external object a
OM_GET method for each of the attributes. This means that the only
attributes that can be tracked are the ones that are gettable on the
external object. There is no limit as to the number of attributes that
are trackable.
You can also pass attributes that are ment for the external object at
initialization time. These attributes are remembered by this class and
re-used at each re-creation of the external object.
Example:
Object *wheel;
struct Screen *screen;
/*
** Create a "colorwheel.gadget" external object.
**/
wheel = ExternalObject,
EXT_MinWidth, 30,
EXT_MinHeight, 30,
EXT_ClassID, "colorwheel.gadget",
WHEEL_Saturation, 0,
WHEEL_Screen, screen,
EXT_TrackAttr, WHEEL_Saturation,
EXT_TrackAttr, WHEEL_Hue,
EndObject;
All tags defined above are saved (including the tags passed
automatically by the ExternalObject macro). Now a seperate copy of the
attributes to track is created.
Once the object needs to be re-created the first thing what is done
is getting the tracked attributes values from the old object.
Now the old object is disposed of and a new one is created with
exactly the same attributes that where passed at initialization time.
Once this is accomplished the tracked attributes are set to the new
object.
Please note that tracking attributes is only necessary with classes
that require a rebuild of the object when it is resized.
Applicability is (I).
BUGS
The EXT_xxx attributes from the initialization tags are not filtered
out of the saved tag list.
SEE ALSO
EXT_NoRebuild
NAME
EXT_Object -- ( Object * )
FUNCTION
Get a pointer to the "real" external object. Please note that this
pointer changes at every size change.
Applicability is (G).
NAME
EXT_NoRebuild -- ( BOOL )
FUNCTION
To tell the external class that the external object does not have to
be rebuild after a re-size. Most classes are smart enough to handle a
re-size of the object themselves but there are classes like the
colorwheel.gadget that requires a rebuild uppon a size change.
When this attribute is set to TRUE the class will not re-build
the external object and you do not need to use the EXT_TrackAttr
attributes to handle the object settings.
Default is FALSE. Applicability is (I).
SEE ALSO
EXT_TrackAttr